package ru.niir.goodfil.db.dic;

import ru.niir.goodfil.utils.Pair;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Волков Олег on 27.11.14.
 */
public final class StorageDeliveryState {

    public static final int IS_DEVERY = 3;

    public static final int NOT_DELIVERY = 1;

    public static final int IS_CHARGED = 2;

    public static String asString(int value) {
        switch (value) {
            case StorageDeliveryState.IS_DEVERY:
                return "ДА";
            case StorageDeliveryState.NOT_DELIVERY:
                return "НЕТ";
            case StorageDeliveryState.IS_CHARGED:
                return "ЗАГР./ОТПР.";
        }
        return "";
    }

    private static Pair getPair(int value) {
        return new Pair(value, asString(value));
    }

    public static List<Pair> list() {
        return new ArrayList<Pair>() {{
            add(getPair(StorageDeliveryState.NOT_DELIVERY));
            add(getPair(StorageDeliveryState.IS_CHARGED));
            add(getPair(StorageDeliveryState.IS_DEVERY));
        }};
    }
}
